package com.sxj.corejava.code15_反射;

import java.io.Serializable;

/**
 * @author 石小俊
 */
public class User extends Person implements Serializable {
    private Integer id;
    public String username;
    protected String password;

    public void show(){
        System.out.println("这是public修饰的show方法");
    }

    protected void print(){
        System.out.println("这是protected修饰的print方法");
    }

    private void test(){
        System.out.println("这是private修饰的test方法");
    }

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                '}';
    }

    public User() {
    }

    private User(String username, String password) {
        this.username = username;
        this.password = password;
    }

    protected User(String username) {
        this.username = username;
    }

    public User(Integer id, String username, String password) {
        this.id = id;
        this.username = username;
        this.password = password;
    }

}

